Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(country-map): update geojson and control layout #14063

Merged
merged 2 commits into from
Apr 13, 2021

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Apr 9, 2021

SUMMARY

Update the GeoJSON of country maps with the latest Natural Earth data (public domain usage) and fix a bunch of usability issues with this viz type.

How the GeoJSON files was generated can be found here.

This should fix #4568 (dup #11666), provide a better solution for #12987 and supersedes apache-superset/superset-ui#955 .

Also updated the controls of the Country Map viz to move the required field "Country" out of "Chart Options" and converted all select option values to lowercase (for simplicity and consistency).

Includes a light weight db migration that runs on all Country Map visualizations. It should be very fast as this is not a very popular visualization type.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

UK map - before

After

UK map - after

TEST PLAN

Tested locally with following virtual dataset:

SELECT 'CN-11' as iso_code, 1 as metric
UNION
SELECT 'CN-12', 22
UNION
SELECT 'CN-30', 24
UNION
SELECT 'CN-14', 189
UNION
SELECT 'US-CA', 999
UNION
SELECT 'US-HI', 1930
UNION
SELECT 'US-TX', 1000
UNION
SELECT 'GB-BKM', 2910
UNION
SELECT 'GB-GLS', 2810
UNION
SELECT 'GB-NYK', 2018

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@ktmud ktmud requested a review from a team as a code owner April 9, 2021 23:46
@codecov
Copy link

codecov bot commented Apr 9, 2021

Codecov Report

Merging #14063 (3ff96e9) into master (7980b76) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

❗ Current head 3ff96e9 differs from pull request most recent head c74fce9. Consider uploading reports for the commit c74fce9 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14063      +/-   ##
==========================================
- Coverage   79.48%   79.36%   -0.12%     
==========================================
  Files         939      939              
  Lines       47587    47587              
  Branches     5949     5949              
==========================================
- Hits        37823    37769      -54     
- Misses       9642     9696      +54     
  Partials      122      122              
Flag Coverage Δ
cypress 56.03% <ø> (-0.02%) ⬇️
hive 80.50% <100.00%> (+<0.01%) ⬆️
mysql ?
postgres ?
presto 80.52% <100.00%> (?)
python 81.00% <100.00%> (-0.21%) ⬇️
sqlite ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rset-frontend/src/components/ErrorMessage/types.ts 100.00% <ø> (ø)
superset/db_engine_specs/postgres.py 95.74% <100.00%> (-1.03%) ⬇️
superset/errors.py 100.00% <100.00%> (ø)
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/databases/commands/create.py 82.35% <0.00%> (-9.81%) ⬇️
superset/databases/commands/update.py 85.71% <0.00%> (-8.17%) ⬇️
superset/db_engine_specs/sqlite.py 90.62% <0.00%> (-6.25%) ⬇️
superset-frontend/src/filters/utils.ts 95.23% <0.00%> (-4.77%) ⬇️
superset/utils/celery.py 86.20% <0.00%> (-3.45%) ⬇️
superset/models/core.py 85.83% <0.00%> (-3.27%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 786dadc...c74fce9. Read the comment docs.

@ktmud ktmud force-pushed the fix-country-map branch from fac7038 to 741ef08 Compare April 10, 2021 01:28
@ktmud ktmud force-pushed the fix-country-map branch from 741ef08 to c74fce9 Compare April 12, 2021 21:36
@ktmud ktmud merged commit 3c88d25 into apache:master Apr 13, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Country Map visualisation for UK - zoomed out
3 participants